import Layout from "@/layout";
let prefix = '/customer-app'

//后台管理
const System = [
  {
    path: '/system',
    name: "BackstageSystem",
    component: Layout,
    redirect: false,
    meta: { title: "后台管理" },
    children: [
      {
        path: 'user',
        name: 'User',
        component: () => import('@/views/System/User/index'),
        meta: { title: '用户管理', policy: 'CentralControl.IdentityUser||CentralControl.IdentityRole' },

      },
      {
        path: 'msg',
        name: 'Message',
        component: () => import('@/views/System/Message/index'),
        meta: {
          title: '消息设置', policy: 'CentralControl.NoticeTemplateConfig'
        },
      },
      {
        path: 'msg/detail/:id',
        name: 'MessageDetail',
        hidden: true,
        component: () => import('@/views/System/Message/detail'),
        meta: { title: '消息详情', 'activeMenu': "/system/msg" },
      },
      {
        path: 'msg/edit/:id',
        name: 'MessageEdit',
        hidden: true,
        component: () => import('@/views/System/Message/edit'),
        meta: { title: '消息编辑', 'activeMenu': "/system/msg", policy: 'CentralControl.NoticeTemplateConfig.Update' },
      },
      {
        path: "msg/add",
        name: 'MessageAdd',
        hidden: true,
        component: () => import('@/views/System/Message/add'),
        meta: { title: '新建消息', 'activeMenu': "/system/msg", policy: 'CentralControl.NoticeTemplateConfig.Create' },
      },
      {
        path: 'appVersion',
        name: 'AppVersion',
        component: () => import('@/views/System/AppVersion/index'),
        meta: { title: 'APP版本管理', policy: 'CentralControl.PackageVersion' },
      },
      // {
      //   path: '/systemSetting',
      //   name: 'SystemSetting',
      //   redirect: false,
      //   meta: {
      //     title: "系统设置",
      //     policy: 'Crm.SystemSetting.ProcessManage.View||Crm.SystemSetting.DictionaryManage.View||Crm.SystemSetting.LoginLog.View'
      //   },
      //   children: [
      //     {
      //       path: prefix + '/processManage',
      //       name: 'PROCESSMANAGE',
      //       meta: {
      //         title: '流程管理',
      //         noCache: false,
      //         policy: 'Crm.SystemSetting.ProcessManage.View'
      //       }
      //     },
      //     {
      //       path: prefix + '/editProcess/:id',
      //       name: 'EDITPROCESS',
      //       meta: {
      //         title: '编辑流程',
      //         noCache: true,
      //         policy: 'Crm.SystemSetting.ProcessManage.Edit'
      //       },
      //       hidden: true,
      //     },
      //     {
      //       path: prefix + '/addProcess',
      //       name: 'ADDPROCESS',
      //       meta: {
      //         title: '新增流程',
      //         noCache: true,
      //         policy: 'Crm.SystemSetting.ProcessManage.Add'
      //       },
      //       hidden: true,
      //     },
      //     {
      //       path: prefix + '/processDetail/:id',
      //       name: 'PROCESSDETAIL',
      //       meta: {
      //         title: '流程详情页',
      //         noCache: true,
      //         policy: 'Crm.SystemSetting.ProcessManage.View'
      //       },
      //       hidden: true,
      //     },
      //     {
      //       path: prefix + '/dictSetting',
      //       name: 'DICTSETTING',
      //       meta: {
      //         title: '字典管理',
      //         noCache: true,
      //         policy: 'Crm.SystemSetting.DictionaryManage.View'
      //       },
      //     },
      //     {
      //       path: prefix + '/loginLog',
      //       name: 'LOGINLOG',
      //       meta: {
      //         title: '登录日志',
      //         noCache: true,
      //         policy: 'Crm.SystemSetting.LoginLog.View'
      //       },
      //     },
      //   ]
      // },
      {
        path: '/process',
        name: 'PROCESS',
        redirect: false,
        children: [
          {
            path: prefix + '/processManage',
            name: 'OPENSEAMANAGE',
            meta: {
              title: '流程管理',
              noCache: false,
              policy: "Crm.SystemSetting.ProcessManage.View"
            }
          },
          {
            path: prefix + '/editProcess/:id',
            name: 'EDITPROCESS',
            meta: {
              title: '编辑流程',
              noCache: true,
              policy: 'Crm.SystemSetting.ProcessManage.Edit'
            },
            hidden: true,
          },
          {
            path: prefix + '/addProcess',
            name: 'ADDPROCESS',
            meta: {
              title: '新增流程',
              noCache: true,
              policy: 'Crm.SystemSetting.ProcessManage.Add'
            },
            hidden: true,
          },
          {
            path: prefix + '/processDetail/:id',
            name: 'PROCESSDETAIL',
            meta: {
              title: '流程详情页',
              noCache: true,
              policy: 'Crm.SystemSetting.ProcessManage.View'
            },
            hidden: true,
          },
        ]
      },
      {
        path: '/dict',
        name: 'DICT',
        children: [
          {
            path: prefix + '/dictSetting',
            name: 'DICTSETTING',
            meta: {
              title: '字典管理',
              noCache: true,
              policy: 'Crm.SystemSetting.DictionaryManage.View'
            },
          },
        ]
      },
      {
        path: '/loginLogPage',
        name: 'LOGINLOGPAGE',
        children: [
          {
            path: prefix + '/loginLog',
            name: 'LOGINLOG',
            meta: {
              title: '登录日志',
              noCache: true,
              policy: 'Crm.SystemSetting.LoginLog.View'
            },
          },
        ]
      },
      {
        path: '/operateLogPage',
        name: 'OPERATELOGPAGE',
        children: [
          {
            path: prefix + '/operateLog',
            name: 'LOGINLOG',
            meta: {
              title: '操作日志',
              noCache: true,
              policy: 'Crm.SystemSetting.OperLog.View'
            },
          },
        ]
      },
      {
        path: '/dataPermissionsPage',
        name: 'LOGINLOGPAGE',
        children: [
          {
            path: prefix + '/dataPermissions',
            name: 'DATAPERMISSIONS',
            meta: {
              title: '数据权限',
              noCache: true,
              policy: 'Crm.SystemSetting.InterfaceManage.View||Crm.SystemSetting.DataRelationManage.View'
            },
          },
        ]
      },
    ]
  },
]

export default System
